<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../../vue.js"></script>
</head>

<body>

  <div id="app">
    <!-- <current-user v-slot:default="abc">
      my name is :{{abc.myusername}}
    </current-user> -->

    <current-user v-slot="abc">
      my name is :{{abc.myusername}}
    </current-user>

  </div>


  <script>

    // Vue.component


    Vue.component('current-user', {
      template: `
      <div>
          <slot v-bind:myusername="username"></slot>
      </div>
  `,
      data() {
        return {
          username: 'hanye'
        }
      }
    })




    var vm = new Vue({
      el: "#app"
    })

  </script>

</body>

</html>